package com.smart.manager.pop.entities.body;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.member.entities.enums.PropsKind;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 游戏管理  食物管理
 * @author leo
 * @date 2023/09/05
 */
public class RBasicDiamond {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RPropsProfile1")
    public static class SearchBody extends BaseSearch {

        @ApiModelProperty("礼包代码")
        private String code;

        @ApiModelProperty("礼包名称")
        private String name;

    }


    @Data
    @ApiModel("RPropsProfile2")
    public static class EditBody  implements Serializable {

        @ApiModelProperty("礼包代码")
        @NotBlank(message = "礼包代码 不能为空")
        private String code;

        @ApiModelProperty("礼包名称")
        @NotBlank(message = "礼包名称 不能为空")
        private String name;

        @ApiModelProperty("售价金币")
        @NotNull(message = "售价金币 不能为空")
        @Min(value = 0,message = "售价金币 小于0")
        private Integer price;

        @ApiModelProperty("档案图标")
        private String icon;

        @ApiModelProperty("礼包类型")
        private PropsKind kind;

        @ApiModelProperty("数量")
        private Integer quantity;


        @ApiModelProperty("档案代码")
        private String dataCode;

        @ApiModelProperty("显示排序")
        @Min(value = 0,message = "显示排序 不能小于0")
        @Max(value = 999,message = "显示排序 不能大于999")
        private Integer sort;
        @ApiModelProperty("礼包说明")
        @NotBlank(message = "礼包说明不能为空")
        @Length(max = 200,message = "礼包说明 不能超过200个字符")
        private String description;

    }


}
